<?php

///este a mayores tiene la lista de usuarios del proyecto
class MilestoneAdminMain extends MilestoneMain
{

    function __construct()
    {
        parent::__construct();
        $this->project_admin = true;
    }

    function handlePOST( Event $e )
    {
        if ( $e->tag == 'crear' ) {

            if ( empty( $_POST[ 'description' ] ) )
                    $this->errors[ ] = 'description';
        }
    }

    function doPOST( Event $e )
    {
        if ( $e->tag == 'crear_milestone' ) {
            $this->crear_milestone();
            $e->cancelBubble();
        } else if ( $e->tag == 'crear_incident' ) {
            $this->crear_incident();
            $e->cancelBubble();
        }
    }

    function crear_milestone()
    {
        $sql = 'INSERT INTO milestones ( description, project, milestone ) VALUES (' . MyLink::quote( $_POST[ 'description' ] ) . ',' . $this->project . ',' . $this->milestone . ')';
        MyLnk::$default->execute( $sql );
    }

    function crear_incident()
    {
        
    }

}

?>
